package com.langsin.factory;

import com.langsin.dao.Flyable;
import com.langsin.dao.impl.CanFly;
import com.langsin.dao.impl.CanNotFly;

/**
 * @author LQWQK
 * @version 1.0
 * @since 2022-06-29 10:12:18
 */
public class LqwqkFlyFactory {

    // 实例工厂  方法不是静态的   什么类型都可以
    public Flyable createFly(String choose){
        if("1".equals(choose)){
            return new CanFly();
        }else{
            return new CanNotFly();
        }
    }
}
